<script setup lang="ts">
import type { Component } from 'vue'

defineProps<{
  onClick: () => void
  icon: Component
  tip: string
}>()
</script>

<template>
  <n-tooltip trigger="hover" placement="left">
    <template #trigger>
      <n-float-button shape="square" @click="onClick()">
        <n-icon :component="icon" />
      </n-float-button>
    </template>
    {{ tip }}
  </n-tooltip>
</template>

<style scoped></style>
